package com.xbongbong.saas.script.tempenum;

import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.saas.enums.business.CompanyCustomerEnum;
import lombok.Getter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/6/15 14:41
 * @since v1.0
 */
@Getter
public enum TempCompanyCustomerEnum {

    /**
     *
     */
    NAME(CompanyCustomerEnum.IMAGE),

    FILE(CompanyCustomerEnum.FILE),

    MEMO(CompanyCustomerEnum.MEMO),
    ;
    private CompanyCustomerEnum anEnum;

    TempCompanyCustomerEnum(CompanyCustomerEnum anEnum) {
        this.anEnum = anEnum;
    }

    public static List<TempCompanyCustomerEnum> getAllEnum() {
        List<TempCompanyCustomerEnum> list = new ArrayList<>();
        Collections.addAll(list, values());
        return list;
    }

    public static void initImage(FieldAttrEntity fieldAttrEntity) {
        fieldAttrEntity.setIsRedundant(1);
    }

    public static void initFile(FieldAttrEntity fieldAttrEntity) {
        fieldAttrEntity.setIsRedundant(1);
    }

    public static void initMemo(FieldAttrEntity fieldAttrEntity) {
        fieldAttrEntity.setIsRedundant(1);
    }
}
